import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'fameex_update_platform_interface.dart';

/// An implementation of [FameexUpdatePlatform] that uses method channels.
class MethodChannelFameexUpdate extends FameexUpdatePlatform {
  /// The method channel used to interact with the native platform.
  @visibleForTesting
  final methodChannel = const MethodChannel('fameex_update');

  @override
  Future<String?> getPlatformVersion() async {
    final version = await methodChannel.invokeMethod<String>('getPlatformVersion');
    return version;
  }

  @override
  Future<bool?> getCheckGoogleUpdate() async {
    final isUpdate = await methodChannel.invokeMethod<bool>('checkGoogleUpdate');
    return isUpdate;
  }

  @override
  Future<void> getStartUpdate() async {
    // final isUpdate = await methodChannel.invokeMethod<void>('startUpdate');
    await methodChannel.invokeMethod<void>('startUpdate');
  }


}
